From 3a917e9da7774112e07a6361bbef7424d380c6a7 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 6 Jun 2000 00:56:00 +0000 Subject: [PATCH] Add call to g_type_init() - we'll need this later, and this makes sure Mon Jun 5 16:00:09 2000 Owen Taylor * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll need this later, and this makes sure that the atexit for glib gets called after that for GDK, so atexits are properly ordered for object leak checking. * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call pango_x_shutdown_display() * gtk/simple.c (main): Close window on destroy. --- ChangeLog | 14 ++++++++++++++ ChangeLog.pre-2-0 | 14 ++++++++++++++ ChangeLog.pre-2-10 | 14 ++++++++++++++ ChangeLog.pre-2-2 | 14 ++++++++++++++ ChangeLog.pre-2-4 | 14 ++++++++++++++ ChangeLog.pre-2-6 | 14 ++++++++++++++ ChangeLog.pre-2-8 | 14 ++++++++++++++ gdk/gdk.c | 6 +++++- gdk/x11/gdkmain-x11.c | 2 ++ gtk/.cvsignore | 2 +- gtk/simple.c | 1 + tests/simple.c | 1 + 12 files changed, 108 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c589306247..910b83c399 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +Mon Jun 5 16:00:09 2000 Owen Taylor + + * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll + need this later, and this makes sure that the atexit for + glib gets called after that for GDK, so atexits are + properly ordered for object leak checking. + + * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). + + * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call + pango_x_shutdown_display() + + * gtk/simple.c (main): Close window on destroy. + Mon Jun 5 11:50:02 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index c589306247..910b83c399 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,17 @@ +Mon Jun 5 16:00:09 2000 Owen Taylor + + * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll + need this later, and this makes sure that the atexit for + glib gets called after that for GDK, so atexits are + properly ordered for object leak checking. + + * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). + + * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call + pango_x_shutdown_display() + + * gtk/simple.c (main): Close window on destroy. + Mon Jun 5 11:50:02 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c589306247..910b83c399 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,17 @@ +Mon Jun 5 16:00:09 2000 Owen Taylor + + * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll + need this later, and this makes sure that the atexit for + glib gets called after that for GDK, so atexits are + properly ordered for object leak checking. + + * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). + + * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call + pango_x_shutdown_display() + + * gtk/simple.c (main): Close window on destroy. + Mon Jun 5 11:50:02 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index c589306247..910b83c399 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,17 @@ +Mon Jun 5 16:00:09 2000 Owen Taylor + + * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll + need this later, and this makes sure that the atexit for + glib gets called after that for GDK, so atexits are + properly ordered for object leak checking. + + * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). + + * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call + pango_x_shutdown_display() + + * gtk/simple.c (main): Close window on destroy. + Mon Jun 5 11:50:02 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c589306247..910b83c399 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,17 @@ +Mon Jun 5 16:00:09 2000 Owen Taylor + + * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll + need this later, and this makes sure that the atexit for + glib gets called after that for GDK, so atexits are + properly ordered for object leak checking. + + * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). + + * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call + pango_x_shutdown_display() + + * gtk/simple.c (main): Close window on destroy. + Mon Jun 5 11:50:02 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c589306247..910b83c399 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,17 @@ +Mon Jun 5 16:00:09 2000 Owen Taylor + + * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll + need this later, and this makes sure that the atexit for + glib gets called after that for GDK, so atexits are + properly ordered for object leak checking. + + * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). + + * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call + pango_x_shutdown_display() + + * gtk/simple.c (main): Close window on destroy. + Mon Jun 5 11:50:02 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c589306247..910b83c399 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,17 @@ +Mon Jun 5 16:00:09 2000 Owen Taylor + + * gdk/gdk.c (gdk_init_check): Add call to g_type_init() - we'll + need this later, and this makes sure that the atexit for + glib gets called after that for GDK, so atexits are + properly ordered for object leak checking. + + * gdk/gdk.c (gdk_exit_func): Call gdk_windowing_exit(). + + * gdk/x11/gdkmain-x11.c (gdk_windowing_exit): Call + pango_x_shutdown_display() + + * gtk/simple.c (main): Close window on destroy. + Mon Jun 5 11:50:02 2000 Owen Taylor * gdk/x11/gdkgc-x11.c (gdk_x11_gc_values_to_xvalues): We need diff --git a/gdk/gdk.c b/gdk/gdk.c index b5b028e5e3..0e3e93c299 100644 --- a/gdk/gdk.c +++ b/gdk/gdk.c @@ -277,7 +277,7 @@ gdk_init_check (int *argc, if (gdk_initialized) return TRUE; - + if (g_thread_supported ()) gdk_threads_mutex = g_mutex_new (); @@ -321,6 +321,8 @@ gdk_init_check (int *argc, GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ())); + g_type_init (); + result = _gdk_windowing_init_check (argc_orig, argv_orig); for (i = 0; i < argc_orig; i++) @@ -425,6 +427,8 @@ gdk_exit_func (void) gdk_image_exit (); gdk_input_exit (); gdk_key_repeat_restore (); + + gdk_windowing_exit (); gdk_initialized = 0; } diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c index 869d5b731b..7ce8a3b35d 100644 --- a/gdk/x11/gdkmain-x11.c +++ b/gdk/x11/gdkmain-x11.c @@ -563,6 +563,8 @@ gdk_beep (void) void gdk_windowing_exit (void) { + pango_x_shutdown_display (gdk_display); + XCloseDisplay (gdk_display); } diff --git a/gtk/.cvsignore b/gtk/.cvsignore index ba55e9b87e..d410a2780b 100644 --- a/gtk/.cvsignore +++ b/gtk/.cvsignore @@ -5,7 +5,7 @@ Makefile.in _libs .libs libgtk-1.1.la -testcalender +testcalendar testgtk testinput testrgb diff --git a/gtk/simple.c b/gtk/simple.c index f7a0822a08..450b3906c2 100644 --- a/gtk/simple.c +++ b/gtk/simple.c @@ -19,6 +19,7 @@ main (int argc, char *argv[]) window = gtk_widget_new (gtk_window_get_type (), "GtkObject::user_data", NULL, + "GtkObject::signal::destroy", gtk_main_quit, NULL, "GtkWindow::type", GTK_WINDOW_TOPLEVEL, "GtkWindow::title", "hello world", "GtkWindow::allow_grow", FALSE, diff --git a/tests/simple.c b/tests/simple.c index f7a0822a08..450b3906c2 100644 --- a/tests/simple.c +++ b/tests/simple.c @@ -19,6 +19,7 @@ main (int argc, char *argv[]) window = gtk_widget_new (gtk_window_get_type (), "GtkObject::user_data", NULL, + "GtkObject::signal::destroy", gtk_main_quit, NULL, "GtkWindow::type", GTK_WINDOW_TOPLEVEL, "GtkWindow::title", "hello world", "GtkWindow::allow_grow", FALSE, -- 2.30.2